<%-- 
    Document   : cadastro
    Created on : 01/11/2011, 10:46:22
    Author     : leonardo
--%>


<%@page import="javax.swing.JOptionPane"%>
<%@page import="br.com.ufpb.halloc.negocio.Departamento"%>
<%@page import="java.util.List"%>
<%@page import="br.com.ufpb.halloc.comunicacao.Facade"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
        <style type="text/css">
            div#back {
                background-color: lightsteelblue;
                height: 370px;
                margin-top: 20px;
                margin-left: 170px;
                margin-right: 170px;
            }
            div#form {
                background-color: #DDD;
                font: 14px Verdana, sans-serif;
                height: 240px;
                margin-top: 5px;
                border: 0px solid #696969;
                margin-left: 150px;
                margin-right: 150px;
            }
            
            div#campos, div#form {
                color: #333;
            }
            
            div#campos, div#tab_inputs tr{                
                font: 16px Verdana, sans-serif;
                color: #369;
                font-weight: bolder;                
            }
            
            select {
                font: 16px Verdana, sans-serif;
                color: #369;
                font-weight: bolder;
            }
            
            #campos select {
                width:400px;
                height: 30px;
                opacity:1;
                filter:alpha(opacity=0);
                margin-left: 100px;
            }
            
            .icod, .icarga, .icred {
                width: 100px;
                height: 20px;
                font: 16px Verdana, sans-serif;
                color: #333;
                font-weight: bolder;
            }
            
            .inome {
                width: 350px;
                height: 20px;
                font: 16px Verdana, sans-serif;
                color: #333;
                font-weight: bolder;
            }
            
        </style>
    </head>
    <body>
        <jsp:include page="menubarra.jsp"></jsp:include>
        <form action="CadastroDisciplina.do" method="POST" id="cadastro">
            <div id="back">
                <br>
                <div align="center">Cadastro de Disciplina</div>
                <div id="form">
                    <div id="campos">
                        <br>                        
                        <div align="center">Departamento</div>
                                <select name="departamento" id="departamento">
                                <% 
                                   Facade fachada = Facade.getInstance();
                                   List<Departamento> dptos = fachada.gettodosOsDepartamentosBD();
                                   for (Departamento d : dptos) {
                                %>
                                      <option value="<%=d.getCodDepartamento()%>"><%=d.getNomeDepartamento()%></option>
                                <% }// fim do for %>
                                </select>
                        <br><br>
                        <table id="tab_inputs" width="90%" align="center">                            
                            <tr>
                                <td>Código:</td>
                                <td><input class="icod" type="text" name="cod_disciplina" size="10"></td>
                            </tr>
                            <tr>
                                <td>Nome: </td>
                                <td><input class="inome" type="text" name="nome_disciplina" size="40"></td>
                            </tr>
                            <tr>
                                <td>Créditos: </td>
                                <td><input class="icred" type="text" name="creditos_disciplina" size="10"></td>
                            </tr>
                        </table>
                    </div>    
                </div> <br>
                <center>
                    <input type="submit" value="Cadastrar">
                </center>
                <br>
            </div>
        </form>
    </body>
</html>
